import Vue from 'vue'
import App from './App'

Vue.config.productionTip = false

App.mpType = 'app'

const app = new Vue({
	...App
})

app.$mount()

console.log(process.env)

const loadJS = (src) => {
	return new Promise(function(resolve, reject) {
		console.log(window,document,'---adouv')
		var script = document.createElement('script');
		var loaded;
		script.src = src;
		script.onload = script.onreadystatechange = function() {
			if (!loaded && (!script.readyState || /loaded|complete/.test(script.readyState))) {
				script.onload = script.onreadystatechange = null;
				loaded = true;
				resolve();
			}
		}
		script.onerror = error => reject(error);
		document.head.appendChild(script);
	});

}

loadJS('https://cdn.bootcss.com/eruda/1.5.2/eruda.min.js').then(() => {
	eruda.init();
})
